package com.qisu;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 *
 * @author alsan
 *
 */
@SpringBootApplication
@ComponentScan("com.qisu")
public class Application {
	private static ConfigurableApplicationContext Context;

	public static void main(String[] args) {
		try {
			SpringApplication app = new SpringApplication(Application.class);
			app.setWebApplicationType(WebApplicationType.NONE);
			;
			Context = app.run(args);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public static ConfigurableApplicationContext getContext() {
		return Context;
	}
}
